<!DOCTYPE html>
<html>
<head>
    <title>发票信息表</title>
		<#include "/header.html">
</head>
<style>
    #rrapp{
        word-break:break-all;
        overflow-x: hidden;
    }
</style>
<body>
<div id="rrapp" v-cloak>

    <div v-show="showList">
        <!-- 查询 start -->
        <div class="grid-btn">
            <form class="form-inline" role="form">

                <a class="btn btn-default btn-sm" @click="reset"><i class="fa fa-refresh"></i></a>

                <a class="btn btn-primary btn-sm"  @click="registerInvoice">登记发票</a>
                <a class="btn btn-danger btn-sm"  @click="registerInvoiceMuti">多开登记</a>

                <div class="form-group">
                    <input type="text" class="form-control input-sm" v-model="q.orderId" @keyup.enter="query" placeholder="订单号">
                </div>&nbsp;&nbsp;&nbsp;

                <div class="form-group">
                    <input type="text" class="form-control input-sm" v-model="q.shipName" @keyup.enter="query" placeholder="联系人">
                </div>&nbsp;&nbsp;&nbsp;

                <div class="form-group">
                    <input type="text" class="form-control input-sm" v-model="q.memberName" @keyup.enter="query" placeholder="客户名称">
                </div>&nbsp;&nbsp;&nbsp;

                <div class="form-group">
                    <input type="text" class="form-control input-sm" v-model="q.shipPhone" @keyup.enter="query" placeholder="联系方式">
                </div>&nbsp;&nbsp;&nbsp;

                <div class="form-group">
                    <input class="form-control input-sm" v-model="q.beginCreatetime" style="width: 120px;" @keyup.enter="query" @click = "checkBeginDate" placeholder="开始时间"/>
                    至
                    <input class="form-control input-sm" v-model="q.endCreatetime" style="width: 120px;"@keyup.enter="query" @click = "checkEndDate" placeholder="结束时间"/>
                </div>&nbsp;&nbsp;&nbsp;

                <a class="btn btn-default btn-sm"  @click="query"><i class="fa fa-search"></i>&nbsp;查询</a>
            </form>

			<!--<#if shiro.hasPermission("invoice:orderinvoice:save")>
            <a class="btn btn-primary btn-sm" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("invoice:orderinvoice:update")>
            <a class="btn btn-primary btn-sm" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("invoice:orderinvoice:delete")>
            <a class="btn btn-primary btn-sm" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>-->
        </div>
        <!-- 查询 end -->
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <!-- 发票录入  -->
    <div id="invoiceLayer" style="display: none;">
        <form class="form-horizontal">
            <div class="form-group">

                <div class="form-group">
                    <div class="col-md-1"></div>
                    <div class="col-md-11">
                        <table class="table table-bordered">
                            <tr class="text-center active">
                                <td>订单号</td>
                                <td>销售金额</td>
                                <td>总额</td>
                            </tr>
                            <tr class="text-center" v-for="(item, index) in invoice.list">
                                <td>{{item.orderId}}</td>
                                <td>{{item.payableAmount}}</td>
                                <td v-if="index == 0" :rowspan="invoice.list.length" style="vertical-align:middle">{{invoice.amount}}</td>
                            </tr>
                        </table>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-md-3 control-label">开票号：</div>
                    <div class="col-md-9">
                        <input type="text" class="form-control" v-model="invoice.orderInvoice.oiTaxId" placeholder="开票号"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-3 control-label">开票金额：</div>
                    <div class="col-md-9">
                        <input type="number" class="form-control" v-model="invoice.orderInvoice.oiTaxMoney" placeholder="开票金额"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-3 control-label">发票类型：</div>
                    <div class="col-md-9">
                        <select class="form-control">
                            <option v-for="item in e.taxTypeEnum" v-if="item.value != 'unwanted' && item.value != 'personal'" v-model="invoice.orderInvoice.oiTaxType" :value="item.value">{{item.describe}}</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-3 control-label">开票日期：</div>
                    <div class="col-md-9">
                        <input type="text" readonly="readonly" class="form-control" v-model="invoice.orderInvoice.oiTaxTime" @click="checkTaxTime" placeholder="开票日期"/>
                    </div>
                </div>
            </div>
        </form>
    </div>

</div>

<script src="${request.contextPath}/statics/js/modules/invoice/orderInvoiceRegister.js?_${.now?long}"></script>
</body>
</html>